;
(function(angular) {
  var directiveApp = angular.module('believel.directive', [
    'mydirective',
    'myController',
    'ui.router'
  ]);
  directiveApp.config(function($stateProvider, $urlRouterProvider) {
    $urlRouterProvider.otherwise('/');
    $stateProvider
      .state('restrict', {
        url: '/restrict',
        templateUrl: 'app/views/restrict.html'
      })
      .state('priority', {
        url: '/priority',
        templateUrl: 'app/views/priority.html'
      })
      .state('terminal', {
        url: '/terminal',
        templateUrl: 'app/views/terminal.html'
      })
      .state('template', {
        url: '/template',
        templateUrl: 'app/views/template.html'
      })
      .state('templateUrl', {
        url: '/templateUrl',
        templateUrl: 'app/views/templateUrl.html'
      })
      .state('replace', {
        url: '/replace',
        templateUrl: 'app/views/replace.html'
      })
      .state('scope1', {
        url: '/scope1',
        templateUrl: 'app/views/scope1.html'
      })
      .state('scope2', {
        url: '/scope2',
        templateUrl: 'app/views/scope2.html'
      })
      .state('transclude1', {
        url: '/transclude1',
        templateUrl: 'app/views/transclude1.html'
      })
      .state('transclude2', {
        url: '/transclude2',
        templateUrl: 'app/views/transclude2.html'
      })
      .state('ctrl', {
        url: '/ctrl',
        templateUrl: 'app/views/ctrl.html'
      })
      .state('ctrlas', {
        url: '/ctrlas',
        templateUrl: 'app/views/ctrlAs.html'
      })
      .state('require', {
        url: '/require',
        templateUrl: 'app/views/require.html'
      })
      .state('compile', {
        url: '/compile',
        templateUrl: 'app/views/compile.html'
      })
      .state('compile2', {
        url: '/compile2',
        templateUrl: 'app/views/compile2.html'
      })
      .state('NgModelController', {
        url: '/NgModelController',
        templateUrl: 'app/views/ngModelController.html'
      })
      .state('ngIf', {
        url: '/ngIf',
        templateUrl: 'app/views/ngIf.html',
        controller: 'myCtrl'
      })
  })
  directiveApp.controller('demoCtrl', ['$scope', function($scope) {
    // scope1
    $scope.mainData = '我是main里内容';
    // scope2
    $scope.mainData2 = 'parent'
    $scope.mainModel = 'aa'
    $scope.getMsg = function() {
      alert('引用父级的方法执行了')
    }
    $scope.datas = ['apple', 'orange', 'banana'];
    $scope.list = [{
      name: 'zpp'
    }, {
      name: 'www'
    }];
    // ngModelController数据
    $scope.test = 1;

    // ng-if中使用ng-model


  }])

})(angular)
